package com.jxc.jxc01.yk.util;

import java.util.UUID;

public class NewUUID {
    public NewUUID() {
    }

    public int getUuid(){
        int uuid = UUID.randomUUID().toString().hashCode();
        if (uuid < 0){
            uuid = -uuid;
        }
        String format = String.format("%010d", uuid).substring(0,10);
        uuid = Integer.parseInt(format);
        return uuid;
    }

    public static void main(String[] args) {
        NewUUID uuid1 = new NewUUID();
        System.out.println(uuid1.getUuid());
    }
}
